/**
 *
 */
package st.yushao.restaurant.action.admin;

import java.util.List;

import st.yushao.restaurant.dao.FoodDaoService;
import st.yushao.restaurant.dao.FoodTypeDaoService;
import st.yushao.restaurant.fw.AbstractBaseAction;
import st.yushao.restaurant.vo.FoodTypeVO;
import st.yushao.restaurant.vo.FoodVO;

/**
 * @author acer
 *
 */
public class GetMntFoodInfo extends AbstractBaseAction {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -8343976814219643755L;

    /**
     * foodTypes
     */
    private List<FoodTypeVO> typeList;

    /**
     * hibernate service of foodtype
     */
    private FoodTypeDaoService ftds;

    /**
     * hibernate service of foodinfo
     */
    private FoodDaoService fds;

    private int foodInfoid;

    private FoodVO food;

    public int getFoodInfoid() {
        return foodInfoid;
    }

    public void setFoodInfoid(int foodInfoid) {
        this.foodInfoid = foodInfoid;
    }

    /* (non-Javadoc)
     * @see st.yushao.restaurant.fw.AbstractBaseAction#doExecute()
     */
    @Override
    public String doExecute() {
        setTypeList(ftds.getFoodTypeListByRest(getRestId()));
        setFood(fds.getFoodById(this.foodInfoid));
        return SUCCESS;
    }

    /**
     * @param ftds the ftds to set
     */
    public void setFtds(FoodTypeDaoService ftds) {
        this.ftds = ftds;
    }
    /**
     * @param fds the fds to set
     */
    public void setFds(FoodDaoService fds) {
        this.fds = fds;
    }

    /**
     * @return the typeList
     */
    public List<FoodTypeVO> getTypeList() {
        return typeList;
    }

    /**
     * @param typeList the typeList to set
     */
    public void setTypeList(List<FoodTypeVO> typeList) {
        this.typeList = typeList;
    }

	/**
	 * @return the food
	 */
	public FoodVO getFood() {
		return food;
	}

	/**
	 * @param food the food to set
	 */
	public void setFood(FoodVO food) {
		this.food = food;
	}

}
